﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LEET.LEETCommon.Model;
using LEET.CommonInterfaces.TestControls;
using Compiled_Tests;
using Compiled_Tests.ProcessWrappers;

namespace LEET.StandardModuals.Instructions
{
    public class Target : Instruction
    {

        string target;
        bool focus;

        public Target(string [] args)
            : base(args){
                target = args[1].Trim();
                focus = (args.Length > 2);
        }

        public static IAutomationActionResult StaticCall(String target, bool focus)
        {
            return new AutomationActionResult(new TargetProcess(target, focus));
        }

        public override String RenderStaticCall()
        {
            return "LEET.StandardModuals.Instructions.Target.StaticCall(\""+target+"\", "+focus.ToString().ToLower()+")";
        }

        public override string PlainText()
        {
            return "Switched to recording " + target + ".";
        }
    }
}
